3.42 \(\int (c+d x) \cot (a+b x) \csc (a+b x) \, dx\)

Optimal. Leaf size=30 \[ -\frac {d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac {(c+d x) \csc (a+b x)}{b} \]

[Out]

-d*arctanh(cos(b*x+a))/b^2-(d*x+c)*csc(b*x+a)/b

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {4410, 3770} \[ -\frac {d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac {(c+d x) \csc (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Cot[a + b*x]*Csc[a + b*x],x]

[Out]

-((d*ArcTanh[Cos[a + b*x]])/b^2) - ((c + d*x)*Csc[a + b*x])/b

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4410

Int[Cot[(a_.) + (b_.)*(x_)]^(p_.)*Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp
[((c + d*x)^m*Csc[a + b*x]^n)/(b*n), x] + Dist[(d*m)/(b*n), Int[(c + d*x)^(m - 1)*Csc[a + b*x]^n, x], x] /; Fr
eeQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rubi steps

\begin {align*} \int (c+d x) \cot (a+b x) \csc (a+b x) \, dx &=-\frac {(c+d x) \csc (a+b x)}{b}+\frac {d \int \csc (a+b x) \, dx}{b}\\ &=-\frac {d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac {(c+d x) \csc (a+b x)}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.06, size = 131, normalized size = 4.37 \[ \frac {d \log \left (\sin \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{b^2}-\frac {d \log \left (\cos \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{b^2}-\frac {c \csc (a+b x)}{b}-\frac {d x \csc (a)}{b}+\frac {d x \csc \left (\frac {a}{2}\right ) \sin \left (\frac {b x}{2}\right ) \csc \left (\frac {a}{2}+\frac {b x}{2}\right )}{2 b}-\frac {d x \sec \left (\frac {a}{2}\right ) \sin \left (\frac {b x}{2}\right ) \sec \left (\frac {a}{2}+\frac {b x}{2}\right )}{2 b} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Cot[a + b*x]*Csc[a + b*x],x]

[Out]

-((d*x*Csc[a])/b) - (c*Csc[a + b*x])/b - (d*Log[Cos[a/2 + (b*x)/2]])/b^2 + (d*Log[Sin[a/2 + (b*x)/2]])/b^2 + (
d*x*Csc[a/2]*Csc[a/2 + (b*x)/2]*Sin[(b*x)/2])/(2*b) - (d*x*Sec[a/2]*Sec[a/2 + (b*x)/2]*Sin[(b*x)/2])/(2*b)

________________________________________________________________________________________

fricas [B]  time = 0.47, size = 62, normalized size = 2.07 \[ -\frac {2 \, b d x + d \log \left (\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) \sin \left (b x + a\right ) - d \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) \sin \left (b x + a\right ) + 2 \, b c}{2 \, b^{2} \sin \left (b x + a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)^2,x, algorithm="fricas")

[Out]

-1/2*(2*b*d*x + d*log(1/2*cos(b*x + a) + 1/2)*sin(b*x + a) - d*log(-1/2*cos(b*x + a) + 1/2)*sin(b*x + a) + 2*b
*c)/(b^2*sin(b*x + a))

________________________________________________________________________________________

giac [B]  time = 0.75, size = 801, normalized size = 26.70 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)^2,x, algorithm="giac")

[Out]

1/2*(b*d*x*tan(1/2*b*x)^2*tan(1/2*a)^2 + b*c*tan(1/2*b*x)^2*tan(1/2*a)^2 + b*d*x*tan(1/2*b*x)^2 - d*log(4*(tan
(1/2*b*x)^4*tan(1/2*a)^2 - 2*tan(1/2*b*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 - 2*tan(
1/2*b*x)*tan(1/2*a) + 1)/(tan(1/2*a)^2 + 1))*tan(1/2*b*x)^2*tan(1/2*a) + d*log(4*(tan(1/2*b*x)^4 + 2*tan(1/2*b
*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 + 2*tan(1/2*b*x)*tan(1/2*a) + tan(1/2*a)^2)/(t
an(1/2*a)^2 + 1))*tan(1/2*b*x)^2*tan(1/2*a) + b*d*x*tan(1/2*a)^2 - d*log(4*(tan(1/2*b*x)^4*tan(1/2*a)^2 - 2*ta
n(1/2*b*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 - 2*tan(1/2*b*x)*tan(1/2*a) + 1)/(tan(1
/2*a)^2 + 1))*tan(1/2*b*x)*tan(1/2*a)^2 + d*log(4*(tan(1/2*b*x)^4 + 2*tan(1/2*b*x)^3*tan(1/2*a) + tan(1/2*b*x)
^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 + 2*tan(1/2*b*x)*tan(1/2*a) + tan(1/2*a)^2)/(tan(1/2*a)^2 + 1))*tan(1/2*b*x)*
tan(1/2*a)^2 + b*c*tan(1/2*b*x)^2 + b*c*tan(1/2*a)^2 + b*d*x + d*log(4*(tan(1/2*b*x)^4*tan(1/2*a)^2 - 2*tan(1/
2*b*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 - 2*tan(1/2*b*x)*tan(1/2*a) + 1)/(tan(1/2*a
)^2 + 1))*tan(1/2*b*x) - d*log(4*(tan(1/2*b*x)^4 + 2*tan(1/2*b*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 +
 tan(1/2*b*x)^2 + 2*tan(1/2*b*x)*tan(1/2*a) + tan(1/2*a)^2)/(tan(1/2*a)^2 + 1))*tan(1/2*b*x) + d*log(4*(tan(1/
2*b*x)^4*tan(1/2*a)^2 - 2*tan(1/2*b*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 - 2*tan(1/2
*b*x)*tan(1/2*a) + 1)/(tan(1/2*a)^2 + 1))*tan(1/2*a) - d*log(4*(tan(1/2*b*x)^4 + 2*tan(1/2*b*x)^3*tan(1/2*a) +
 tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 + 2*tan(1/2*b*x)*tan(1/2*a) + tan(1/2*a)^2)/(tan(1/2*a)^2 + 1))*
tan(1/2*a) + b*c)/(b^2*tan(1/2*b*x)^2*tan(1/2*a) + b^2*tan(1/2*b*x)*tan(1/2*a)^2 - b^2*tan(1/2*b*x) - b^2*tan(
1/2*a))

________________________________________________________________________________________

maple [A]  time = 0.02, size = 52, normalized size = 1.73 \[ -\frac {d x}{b \sin \left (b x +a \right )}+\frac {d \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{b^{2}}-\frac {c}{b \sin \left (b x +a \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*cos(b*x+a)*csc(b*x+a)^2,x)

[Out]

-1/b*d/sin(b*x+a)*x+1/b^2*d*ln(csc(b*x+a)-cot(b*x+a))-1/b*c/sin(b*x+a)

________________________________________________________________________________________

maxima [B]  time = 0.38, size = 259, normalized size = 8.63 \[ -\frac {\frac {{\left (4 \, {\left (b x + a\right )} \cos \left (b x + a\right ) \sin \left (2 \, b x + 2 \, a\right ) - 4 \, {\left (b x + a\right )} \cos \left (2 \, b x + 2 \, a\right ) \sin \left (b x + a\right ) + {\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) + 4 \, {\left (b x + a\right )} \sin \left (b x + a\right )\right )} d}{{\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} b} + \frac {2 \, c}{\sin \left (b x + a\right )} - \frac {2 \, a d}{b \sin \left (b x + a\right )}}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)^2,x, algorithm="maxima")

[Out]

-1/2*((4*(b*x + a)*cos(b*x + a)*sin(2*b*x + 2*a) - 4*(b*x + a)*cos(2*b*x + 2*a)*sin(b*x + a) + (cos(2*b*x + 2*
a)^2 + sin(2*b*x + 2*a)^2 - 2*cos(2*b*x + 2*a) + 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*cos(b*x + a) + 1)
- (cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 - 2*cos(2*b*x + 2*a) + 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*c
os(b*x + a) + 1) + 4*(b*x + a)*sin(b*x + a))*d/((cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 - 2*cos(2*b*x + 2*a)
+ 1)*b) + 2*c/sin(b*x + a) - 2*a*d/(b*sin(b*x + a)))/b

________________________________________________________________________________________

mupad [B]  time = 2.28, size = 88, normalized size = 2.93 \[ -\frac {d\,\ln \left ({\mathrm {e}}^{a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}+1{}\mathrm {i}\right )}{b^2}+\frac {d\,\ln \left (d\,2{}\mathrm {i}-d\,{\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,1{}\mathrm {i}}\,2{}\mathrm {i}\right )}{b^2}-\frac {{\mathrm {e}}^{a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}}\,\left (c+d\,x\right )\,2{}\mathrm {i}}{b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(a + b*x)*(c + d*x))/sin(a + b*x)^2,x)

[Out]

(d*log(d*2i - d*exp(a*1i)*exp(b*x*1i)*2i))/b^2 - (d*log(exp(a*1i + b*x*1i)*1i + 1i))/b^2 - (exp(a*1i + b*x*1i)
*(c + d*x)*2i)/(b*(exp(a*2i + b*x*2i) - 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right ) \cos {\left (a + b x \right )} \csc ^{2}{\left (a + b x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)**2,x)

[Out]

Integral((c + d*x)*cos(a + b*x)*csc(a + b*x)**2, x)

________________________________________________________________________________________